Called when tab is clicked.

<div class="definition">
    onClick = function(event)
</div>

You can add event listener during the object creation:
<textarea class="javascript">
let tabs = new w2tabs({
    name: 'tabs',
    active: 'tab1',
    tabs: [
        { id: 'tab1', text: 'Tab 1' },
        { id: 'tab2', text: 'Tab 2' },
        { id: 'tab3', text: 'Tab 3' },
        { id: 'tab4', text: 'Tab 4' }
    ],
    onClick(event) {
        console.log(event);
    })
});
</textarea>

or after the object has been created:

<textarea class="javascript">
w2ui.tabs.on('click', function(event) {
    console.log(event);
});
</textarea>

You can add a listener to an individual tab, see <a class="method" href="w2tabs.tabs">.tabs</a> property.
<div style="height: 10px"></div>

The event handler is called before the default action of the event is triggered. You can cancel the default action by calling
<span class="method">event.preventDefault()</span>. To perform an action
after the event is fully processed, define <span class="method">event.onComplete</span> function.
<div style="height: 10px;"></div>
See <a href="utils/events">events</a> page in utilities for more details.